<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

$sqlevent = "CREATE TABLE IF NOT EXISTS Event (
  `event_id` int(10) NOT NULL AUTO_INCREMENT,
  `event_title` varchar(300) DEFAULT NULL,
  `event_description` text,
  `event_more` text,
  `event_start` time DEFAULT NULL,
  `event_stop` time DEFAULT NULL,
  `event_price` varchar(100) DEFAULT NULL,
  `event_location` varchar(200) DEFAULT NULL,
  `event_type` int(10) NOT NULL,
  `event_img` varchar(200) DEFAULT NULL,
  `event_video` varchar(300) DEFAULT NULL,
  `event_publish` enum('true','false') DEFAULT NULL,
  `event_view` char(1) DEFAULT NULL,
  PRIMARY KEY (`event_id`))
";

$sqlsubevent = "CREATE TABLE IF NOT EXISTS `SubEvent` (
  `subevent_id` int(10) NOT NULL AUTO_INCREMENT,
  `subevent_date` date DEFAULT NULL,
  `subevent_start` time DEFAULT NULL,
  `subevent_stop` time DEFAULT NULL,
  `subevent_location` varchar(100) DEFAULT NULL,
  `subevent_price` varchar(100) DEFAULT NULL,
  `subevent_title` varchar(200) DEFAULT NULL,
  `subevent_description` text,
  `subevent_more` text,
  `subevent_img` varchar(20) DEFAULT NULL,
  `subevent_video` varchar(60) DEFAULT NULL,
  `subevent_mainevent` int(10) DEFAULT NULL,
  `subevent_publish` enum('true','false') DEFAULT NULL,
  `hide_main` enum('true','false') DEFAULT NULL,
  PRIMARY KEY (`subevent_id`))";

$sqleventtags = "CREATE TABLE IF NOT EXISTS `EventType` (
  `type_id` int(10) NOT NULL AUTO_INCREMENT,
  `type_index` int(5) DEFAULT NULL,
  `type_tag` varchar(50) NOT NULL,
  `type_header` text,
  `type_footer` text,
  `type_publish` enum('true','false') DEFAULT NULL,
  PRIMARY KEY (`type_id`))";

mysql_query($sqleventtags);
mysql_query($sqlevent);
mysql_query($sqlsubevent);

$sqlpluginextrv = "INSERT INTO Plugin (plugid,plugin) VALUES (2, 'extravaganza')";
mysql_query($sqlpluginextrv);

$sqlpluginextrvmenu1 = "INSERT INTO PluginMenu (pmID, pmNAME, pmPLUGIN) VALUES
(3,'EXTRAVAGANZA:CALENDAR', 2),
(4,'EXTRAVAGANZA:CATEGORIES', 2),
(5,'EXTRAVAGANZA:SPOTLIGHT', 2)";
mysql_query($sqlpluginextrvmenu1);
?>
